﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="GameByTag.aspx.vb" Inherits="CW1.GameByTag" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p class="addContentTitle">Games By Tag</p>
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <font size="large"><a href="GameByTag.aspx?TagName=<%#Eval("TagName") %>"><%#Eval("TagName") %></a> | </font>
        </ItemTemplate>
    </asp:Repeater>
    <font size="large"><a href="GameByTag.aspx">Show All</a></font>
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" Width="989px" 
            AllowPaging="True" AllowSorting="True" BackColor="White" BorderColor="#CC9966" 
            BorderStyle="None" BorderWidth="1px" CellPadding="4" Height="16px">
            <Columns>
                <asp:BoundField DataField="GameName" HeaderText="Game Name" 
                    SortExpression="GameName"></asp:BoundField>
                <asp:TemplateField HeaderText="Release Date" SortExpression="ReleaseDate">
                    <ItemTemplate>
                        <%# getDate(Eval("ReleaseDate").ToString)%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Platform" HeaderText="Platform" 
                    SortExpression="Platform"></asp:BoundField>
                <asp:BoundField DataField="SeriesName" HeaderText="Series Name" 
                    SortExpression="SeriesName"></asp:BoundField>
                <asp:ImageField 
                    DataImageUrlField="ThumbNail" DataImageUrlFormatString="/{0}" 
                    HeaderText="Thumb Nail">
                    <ControlStyle Height="80px" Width="220px" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="OfficialWebsite" 
                    DataNavigateUrlFormatString="{0}" HeaderText="Official Website" Text="GO" SortExpression="OfficialWebsite" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="/details.aspx?ID={0}" HeaderText="Details" 
                    Text="View Details" />
            </Columns>
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
            <RowStyle ForeColor="#330099" BackColor="White" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            <SortedAscendingCellStyle BackColor="#FEFCEB" />
            <SortedAscendingHeaderStyle BackColor="#AF0101" />
            <SortedDescendingCellStyle BackColor="#F6F0C0" />
            <SortedDescendingHeaderStyle BackColor="#7E0000" />
        </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:WarriorConnection %>" 
        ProviderName="<%$ ConnectionStrings:WarriorConnection.ProviderName %>" 
        SelectCommand="SELECT [ID], [GameName], [ReleaseDate], [Platform], [SeriesName], [ThumbNail], [OfficialWebsite] FROM [GameQuery]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:WarriorConnection %>" 
        ProviderName="<%$ ConnectionStrings:WarriorConnection.ProviderName %>" 
        
        SelectCommand="SELECT DISTINCT [TagName], [GameName], [ReleaseDate], [Platform], [SeriesName], [ThumbNail], [OfficialWebsite], [ID] FROM [GameTagQuery] WHERE ([TagName] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="TagName" QueryStringField="TagName" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:WarriorConnection %>" 
        ProviderName="<%$ ConnectionStrings:WarriorConnection.ProviderName %>" 
        SelectCommand="SELECT [ID], [TagName] FROM [Tag]"></asp:SqlDataSource>
</asp:Content>
